#include <bits/stdc++.h>
#define int long long 
using namespace std;

void solve(){
	int sum=0;
	int cnt=0;
	int mn=1e18;
	int mx = -1e8;
	int n;
	cin >> n;
	int tmp;
	for (int i=1;i<=n;i++) {
		cin >> tmp;
		if (tmp >= 0) {
			sum += tmp;
			cnt++;
			mn = min(mn, tmp);
		} else {
			mx = max(mx, tmp);
		}
	}
	if (cnt % 2 ==1) {
		if (mn+mx > 0) {
			sum += mx;
		} else {
			sum -= mn;
		}
	}
	cout << sum << '\n';
}


signed main(){
	ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
	int t=1;
	while (t--) {
		solve();
	}
	return 0;
}
